﻿using Rsd.Dudu;
using Rsd.Dudu.Web.Core;
using Rsd.Faith.Bank.Services;
using Rsd.Faith.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Rsd.Faith.Bank
{
    public static class Config
    {
        private static FaithPluginConfig _config = null;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static PluginConfig GetConfig(string path=null)
        {
            //ServicesContainer.AddService(new OrderService(), new OrderLoggerService(null));
            ServicesContainer.AddService(new BankService());

            if (_config == null)
            {
                _config = new FaithPluginConfig(Assembly.GetExecutingAssembly(), path);
            }
            return _config;
        }
       
       
    }
}
